P4 processes on remote machines are ordinarily created by rsh. For this to work, the user must have permission to create processes on that machine. This permission is normally granted either globally by the system administrator, or locally by the use of .rhosts files. (See the normal unix man pages under rhosts).
Since rsh is relatively slow, p4 provides a way to get things started faster. This is accomplished by running the program serv_p4 in the background on the remote machine. When p4 is creating processes, it will automatically check for the existence of this server and use it if it is running. Remote processes typically start much faster when the server is running. A disadvantage of using the server is that output from p4_dprintf is lost unless directed by a command-line argument to a file. (Command-Line Arguments.) When p4 uses rsh, the remote process's stdout is sent back to the stdout of the parent (the p4 master process). We have not yet tested this server on all of the machines that we support. Thus far, we have tested it somewhat on the SYMMETRY, SUN, DEC500, and SGI. We believe that it will work on many other machines, but have not yet verified it on all machines.
An invocation of a set of servers is (currently) associated with a specific port number. This way multiple users can each be running multiple server networks without mutual interference, provided each network of servers is started with a different port number.
To start the secrue server on a machine one can do
where <num> is a port number to be associated with a network of servers. If the -p option is omitted, the server will pick an unused port number and report
Then p4 programs to use this network should be started with
The p4 application must also be listed in the user's .p4apps file in his home directory. This file should be readable only by the user, and should contain the full path names of programs that the user wishes to be startable by the p4 server.
When a p4 master process tries to start a slave process on a remote machine, it will first attempt to do it via the server. If it cannot do so for any reason (no server running, port number mismatch, or program not found in .p4apps file), then it tries to do so with the remote shell command.
Note that the server is used only to start processes; it plays no role in a p4 computation once the slave processes have been initiated. Rather, a temporary process, called the listener, is spawned to manage connection requests that occur during the execution of a p4 program. Neither the server nor the listener consumes any significant amount of CPU time.
There is further discussion of installation options for the servers in the README file in the p4/servers subdirectory.
Utilities for Managing a p4 Session,Creating Logfiles for Upshot,Faster Startup with the Secure Server,Top